package com.swings.application.utility.casesignal;

import java.util.ArrayList;

import org.apache.log4j.Logger;

/**
 * <p>
 * <b>Overview:</b>
 * <p>
 * 
 * 
 * <pre>
 * Creation date: Feb 16, 2015
 * @author Amit Kshirsagar
 * @version 1.0
 * @since
 * 
 * <p><b>Modification History:</b><p>
 * 
 * 
 * </pre>
 */

public class CaseDetailList extends ArrayList<CaseDetail> {
	static Logger log = Logger.getLogger(CaseDetailList.class.getName());

	public CaseDetail getCaseDetail(int index) {
		return super.get(index);
	}

	public void addCaseDetail(CaseDetail caseDetail) {
		if (!super.contains(caseDetail)) {
			this.add(caseDetail);
		}
	}

	private int index = 0;

	public boolean hasNext() {
		if (index < this.size()) {
			index++;
			return true;
		} else {
			return false;
		}
	}

	public CaseDetail getNextCaseDetail() {
		if (index < this.size()) {
			return super.get(index);
		} else {
			return null;
		}
	}
}
